package com.wt.chat.controller;

import com.wt.chat.entity.Group;
import com.wt.chat.response.ResponseResult;
import com.wt.chat.service.GroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @description
 * @author: wangtao
 * @date:14:12 2019/12/11
 * @email:taow02@jumei.com
 */
@Controller
@RequestMapping("/group")
public class GroupController {

	@Autowired
	private GroupService groupService;

	@RequestMapping("/findAll")
	public ResponseResult findall(){
		List<Group> groups = groupService.findAll();
		return new ResponseResult().code(0).body(groups);
	}

}
